package Game;
import org.newdawn.slick.SlickException;



public class Setup {

	
	
	public Setup(){
		
	}
	
	public WaveHandler setup(Map map) throws SlickException{		
    	// Create the waves	
		return setupWave(setupPath(map));
	}
	
	
	private WaveHandler setupWave(Path startingPath ) throws SlickException{
    	WaveHandler wh = new WaveHandler(startingPath);
    	//Here we generate the Wave.
    	Wave wave = new Wave();
    	for(int i = 0; i < 10; i++){
    		wave.addUnit(new Enemy(startingPath));
    	}
		wh.addWave(wave);
    	wh.nextWave();
		return wh;
	}
	
	private Path setupPath(Map map) throws SlickException{
	   	PathMaker pm = new PathMaker(map);
	   	//Here's where we create the path?
    	pm.makePath();
    	pm.print();
    	return pm.getStartingPath();
	}
	
}
